package com.siae.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
@Schema(name = "user",description = "用户信息")
public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @Schema(name = "account",description = "用户账号（用户工号或者学号）")
    private String account;
    @Schema(name = "password",description = "用户密码")
    private String password;
    @Schema(name = "userName",description = "用户昵称")
    @TableField(value = "user_name")
    private String userName;
    @Schema(name = "sex",description = "性别 1：女 2：男")
    private Integer sex;
    @Schema(name = "age",description = "年龄")
    private Integer age;
    @Schema(name = "avatarUrl",description = "头像地址")
    @TableField(value = "avatar_url")
    private String avatarUrl;
    @Schema(name = "job",description = "用户工作单位")
    private Integer job;
    @Schema(name = "roleId",description = "用户角色id")
    @TableField(value = "role_id")
    private Integer roleId;
    @Schema(name = "addTime",description = "创建时间")
    @TableField(value = "add_time")
    private Date addTime;
    @Schema(name = "updateTime",description = "修改时间")
    @TableField(value = "update_time")
    private Date updateTime;
    @Schema(name = "lastIp",description = "用户最后一次登录ip")
    @TableField(value = "last_ip")
    private String lastIp;
    @Schema(name = "failedAttempts",description = "登录失败次数")
    @TableField(value = "failed_attempts")
    private Integer failedAttempts;
    @Schema(name = "lockedUntil",description = "账号锁定时间")
    @TableField(value = "locked_until")
    private String lockedUntil;
    @Schema(name = "isDel",description = "逻辑删除 0：未删 1：已删")
    @TableField(value = "is_del")
    private Integer isDel;
}
